<template>
  <!-- 报废列表 -->
  <custom-table
    :multipleSelection="true"
    :data="scrappageList"
    :columns="columns"
    :tableLoadingFlag="tableLoadingFlag"
    :operationColumn="operationColumn"
    :pagination="pagination">
  </custom-table>
</template>

<script>
  import CustomTable from '@/components/table/CustomTable'

  export default {
    components: {
      CustomTable
    },
    created() {
      this.getScrappageList()
    },
    data() {
      return {
        tableLoadingFlag: false,             // 角色列表相关数据
        columns: [
          {label: '型号', name: 'model', align: 'center'},
          {label: 'YSTSN', name: 'ystsn', align: 'center'},
          {label: '入库时间', name: 'time', align: 'center'},
          {label: '生产厂商', name: 'factory', align: 'center'}
        ],
        operationColumn: {
          width: '200',
          operations: [
            {name: '维修病例', callback: this.onBtnRepairHistory},
            {name: '返还用户', callback: this.onBtnReturnCustomer}
          ]
        },
        scrappageList: [],
        pagination: {
          totalRecords: 0,
          totalPages: 1,
          pageSize: 15,
          currentPage: 1
        }
      }
    },
    methods: {
      getScrappageList() {
      },
      onBtnReturnCustomer() {
        this.$router.push({path: '/repairs/logistics'})
      },
      onBtnRepairHistory() {
      }
    }
  }
</script>
